package com.changgou.order.feign;

import com.changgou.entity.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

/**
 * @Author: HuangFu
 * @Date: 2020/2/15 10:21
 * @Description:
 */
@FeignClient( name = "order")
public interface CartFeign {

    /**
     * 添加购物车
     * @param skuId
     * @param num
     * @return
     */
    @PostMapping("/cart/add")
    Result add(@RequestParam("skuId") String skuId, @RequestParam("num") Integer num);


    /**
     * 查询购物车
     * @return
     */
    @GetMapping("/cart/list")
    Result<Map> list();
}

